package cn.shyouchi.wuguanjia.android.ui.event.train;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * Created by Eenie on 2016/10/27 at 15:22
 * Email: 472279981@qq.com
 * Des:
 */

public class TrainEntity {


    /**
     * resultCode : 0
     * resultMessage : [{"id":1,"project_id":1,"trainingname":"微笑哦","trainingcontent":"危险！！","image":[{"image":"/images/project/20161116/20161116152114YC550633263.jpg"},{"image":"/images/project/20161116/20161116152114YC785352303.jpg"}]},{"id":2,"project_id":1,"trainingname":"微笑哦","trainingcontent":"危险！！","image":[{"image":"/images/project/20161116/20161116152138YC1489242958.jpg"}]},{"id":3,"project_id":1,"trainingname":"危险","trainingcontent":"危险期望越大","image":[]},{"id":4,"project_id":1,"trainingname":"危险","trainingcontent":"危险期望越大","image":[]},{"id":5,"project_id":1,"trainingname":"危险","trainingcontent":"危险期望越大","image":[]},{"id":6,"project_id":1,"trainingname":"危险","trainingcontent":"危险期望越大","image":[]}]
     */

    private int resultCode;
    private List<ResultMessageBean> resultMessage;

    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public List<ResultMessageBean> getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(List<ResultMessageBean> resultMessage) {
        this.resultMessage = resultMessage;
    }

    public static class ResultMessageBean implements Parcelable {
        /**
         * id : 1
         * project_id : 1
         * trainingname : 微笑哦
         * trainingcontent : 危险！！
         * image : [{"image":"/images/project/20161116/20161116152114YC550633263.jpg"},{"image":"/images/project/20161116/20161116152114YC785352303.jpg"}]
         */

        private int id;
        private int project_id;
        private String trainingname;
        private String trainingcontent;
        private List<String> image;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getProject_id() {
            return project_id;
        }

        public void setProject_id(int project_id) {
            this.project_id = project_id;
        }

        public String getTrainingname() {
            return trainingname;
        }

        public void setTrainingname(String trainingname) {
            this.trainingname = trainingname;
        }

        public String getTrainingcontent() {
            return trainingcontent;
        }

        public void setTrainingcontent(String trainingcontent) {
            this.trainingcontent = trainingcontent;
        }

        public List<String> getImage() {
            return image;
        }

        public void setImage(List<String> image) {
            this.image = image;
        }

        public static class ImageBean {
            /**
             * image : /images/project/20161116/20161116152114YC550633263.jpg
             */

            private String image;

            public String getImage() {
                return image;
            }

            public void setImage(String image) {
                this.image = image;
            }
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.id);
            dest.writeInt(this.project_id);
            dest.writeString(this.trainingname);
            dest.writeString(this.trainingcontent);
            dest.writeStringList(this.image);
        }

        public ResultMessageBean() {
        }

        protected ResultMessageBean(Parcel in) {
            this.id = in.readInt();
            this.project_id = in.readInt();
            this.trainingname = in.readString();
            this.trainingcontent = in.readString();
            this.image = in.createStringArrayList();
        }

        public static final Parcelable.Creator<ResultMessageBean> CREATOR = new Parcelable.Creator<ResultMessageBean>() {
            @Override
            public ResultMessageBean createFromParcel(Parcel source) {
                return new ResultMessageBean(source);
            }

            @Override
            public ResultMessageBean[] newArray(int size) {
                return new ResultMessageBean[size];
            }
        };
    }
}
